package com.example.design.templateDemo;

public abstract class DoTemplate {


    public void doSomeThing() {
        dealLog();
        dealMessage();
        dealSomeThing();
    }

    protected abstract void dealSomeThing();


    protected void dealMessage() {
        System.out.println("处理消息");
    }

    protected void dealLog() {
        System.out.println("打印日志");
    }

}
